from tkinter import *
import time

def ring(clockname, sound):
	head = "时间到 - pyTimeManager"

	show = Tk()
	show.title(head)

	# settings = eval(sys.argv[1])
	# settings = sys.argv[1]
	# print(settings)
	msg = "       %s       " % clockname

	if sound:
		print("\a")
		# time.sleep(1)
		# print("\a")
		
	# notUsed = tkinter.messagebox.showinfo(head, clockname)
	Label(show, text = msg, font = ("微软雅黑", 20)).pack()
	Button(show, text = "确定", command = show.quit, width = 10).pack(
		anchor = E, side=BOTTOM, padx = 10, pady = 5)
	show.mainloop()

if __name__ == "__main__":
	ring("新年好", True)
	ring("去还书", False)